﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Os.WebUI.ViewModels.OrdenServicoReportViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	.: Relatório de Ordens de Serviço :.
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="headContent" runat="server">
    <script type="text/javascript">
        $(function() {
            $(".data").datepicker({
                changeMonth: true,
                changeYear: true
            });
        });
    </script>
    <script src="<%= Html.getDiretorioBase() %>Scripts/Loading.js" type="text/javascript"></script>
    <script src="<%= Html.getDiretorioBase() %>Scripts/showDados.js" type="text/javascript"></script>
    <script src="<%= Html.getDiretorioBase() %>Scripts/OrdemServicoReport.js" type="text/javascript"></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Relatório de Ordens de Serviço</h2>
    
    <div>
        <div class="editor-label">
            <%= Html.Label("Data Inicial:") %>
        </div>
        <div class="editor-field">
            <%= Html.TextBox("DataInicial", string.Format("{0:dd/MM/yyyy}", Model.DataAberturaInicial), new { CLASS = "data" })%>
        </div>
        <div class="editor-label">
            <%= Html.Label("Data Final:") %>
        </div>
        <div class="editor-field">
            <%= Html.TextBox("DataFinal", string.Format("{0:dd/MM/yyyy}", Model.DataAberturaFinal), new { CLASS = "data" })%>
        </div>
        <div class="editor-label">
            <%= Html.Label("Status:") %>
        </div>
        <div class="editor-field">
            <%= Html.DropDownList("Status",new SelectList(ViewData["StatusOs"] as IEnumerable, "IdStatus", "Nome", 0),"Todos") %>
        </div>
        <div class="editor-label">
            <%= Html.Label("Cliente:") %>
        </div>
        <div class="editor-field">
            <%= Html.LoadCliente(ViewData["Clientes"] as IEnumerable, Model.Cliente,true) %>
        </div>
        <input id="geraRelatorio" type="button" value="Gerar Relatório" />
    </div>
    <div id="report" >
    </div>
    <div style="position:relative;top:5px;">
        <%= Html.ActionLink("Voltar para Relatórios", "Index") %>
    </div>
</asp:Content>
